package com.allwees.bs.module.scm.req;

import com.allwees.bs.core.modelbase.req.Req;
import com.allwees.bs.core.modelbase.validate.ValidateItem;
import lombok.Data;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.ArrayUtils;

import java.util.Set;

@Data
public class BatchAllocateOrderSkuReq extends Req implements BatchReq {

    private Set<String> allocateOrderSkuUuids;

    @Override
    public ValidateItem[] getValidateItems() {
        return ArrayUtils.addAll(
                super.getValidateItems(),
                new ValidateItem(CollectionUtils.isEmpty(allocateOrderSkuUuids), "allocateOrderSkuUuids 不能为空")
        );
    }

    @Override
    public Set<String> getUuids() {
        return allocateOrderSkuUuids;
    }
}
